package trading.ctm.yunjing.module.information.adapter

import android.support.v4.app.Fragment
import android.support.v4.app.FragmentManager
import android.support.v4.app.FragmentPagerAdapter
import cc.vv.baselibrary.fragment.BaseFragment
import trading.ctm.yunjing.module.information.fragment.InformationViewpagerFragment

class InformationViewPageAdapter : FragmentPagerAdapter{

    var mFragments: List<BaseFragment>? = null
    var mTitls: List<String>? = null

    constructor(fm: FragmentManager, fragments: ArrayList<InformationViewpagerFragment>, titls: List<String>):super(fm){
        mFragments = fragments
        mTitls = titls
    }

    override fun getItem(position: Int): Fragment {
        return mFragments!![position]
    }

    override fun getCount(): Int {
        return mTitls!!.size
    }

    override fun getPageTitle(position: Int): CharSequence {
        return mTitls!![position]

    }

}